home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ARMLINUX / MAIL / 9805 / 000182_P.C.F.Norman@exeter.ac.uk _Tue May 26 13:30:49 1998.msg < prev    next >
Internet Message Format  |  1998-06-02  |  4KB

  1. Return-Path: <P.C.F.Norman@exeter.ac.uk>
  2. Received: from exeter.ac.uk (hermes.ex.ac.uk [144.173.6.14])
  3.     by odie.barnet.ac.uk (8.8.6/8.8.6) with ESMTP id NAA21454
  4.     for <willy@odie.barnet.ac.uk>; Tue, 26 May 1998 13:30:48 +0100
  5. Received: from hebe [144.173.6.23] by hermes via SMTP (NAA17320); Tue, 26 May 1998 13:31:05 +0100 (BST)
  6. Date: Tue, 26 May 1998 13:31:05 +0100 (BST)
  7. From: Phil Norman <P.C.F.Norman@exeter.ac.uk>
  8. X-Sender: py95pcfn@hebe
  9. To: Matthew Wilcox <willy@odie.barnet.ac.uk>
  10. cc: dooby <dooby@BITS.bris.ac.uk>, linux-arm@vger.rutgers.edu
  11. Subject: Re: Loadmap and Filecore problems on an A5000
  12. In-Reply-To: <199805261143.MAA21348@odie.barnet.ac.uk>
  13. Message-ID: <Pine.SGI.3.91.980526132046.18866C-100000@hebe>
  14. MIME-Version: 1.0
  15. Content-Type: TEXT/PLAIN; charset=US-ASCII
  16. Status: RO
  17.  
  18. On Tue, 26 May 1998, Matthew Wilcox wrote:
  19.  
  20. > Not really.  You could reformat the filecore and put a new linux partition
  21. > in below the linux table.  Maybe.  I wouldn't like to try it though.
  22. > What you can do is boot with -bootkernel and then specify `root=/dev/hda3
  23. > ro' Maybe I'll rewrite some of the documentation post-exams to make this
  24. > more clear.  (And reread other bits of it so I understand some of the
  25. > options I don't use.. my hazy memory tells me it should be possible to
  26. > boot with a kernel somewhere else without having to enter those extra
  27. > options elsewhere..)
  28.  
  29. There is a way to hack the bootloader so it automatically assumes what 
  30. extra arguments you want it to assume.  I did it to mine in the following 
  31. manner:
  32.  
  33. 1:    Ran the bootloader through the debugger and got it to decompress 
  34. itself, and then used the *command thing from the debugger's main menu to 
  35. *save the now-decompressed !RunImage (*save $.foo 8000 <whatever the 
  36. final address in the current wimpslot is> - use the debugger's window to 
  37. scroll down to the end if application memory to find this out).
  38.  
  39. 2:    Load the decompressed !RunImage into your favourite text editor 
  40. and clip as much of the end off as you feel safe clipping (most of the 
  41. wimpslot you saved will be data or random garbage, which can be safely 
  42. removed without changing the way the program runs).
  43.  
  44. 3:    With your newly-shortened, decompressed !RI still in the text 
  45. editor, search for the instruction (you'll have to be in disassembly mode 
  46. to do this) OS_ReadLine and replace it with a branch to the end of the 
  47. binary, where you should insert the following:
  48.  
  49.     STMDB    r13!,{r0-r8,r14}
  50.     ADR    r1,foo
  51.     LDMIA    r1,{r2-r5}
  52.     STMIA    r0,{r2-r5}
  53.     LDMIA    r13!,{r0-r8,pc}^
  54. .foo
  55.     EQUS    "root=/dev/hda3"+CHR$10
  56.     ALIGN
  57.  
  58. Now, running the bootloader with "-bootkernel 
  59. ADFS::4.$.ARMLinux.kernels.wibble" should automatically assume that 
  60. /dev/hda3 is the root partition.  The operation of the program will be 
  61. exactly as if you had typed "root=/dev/hda3" at the prompt yourself.
  62.  
  63. SANITY WARNING:  DO NOT attempt this unless you are confident with 
  64. hacking about with binaries.
  65.  
  66. SANITY WARNING #2:  KEEP A COPY OF THE ORIGINAL !RunImage!!!
  67.  
  68. However, if you do know what you're doing and hack it correctly, it 
  69. should work fine.  Mine currently works like a dream, and I've even got 
  70. an alias set up so all I have to do to boot into linux is to type *linux 
  71. at the command prompt :-).
  72.  
  73. Enjoy your hacking should you feel up to it,
  74. Phil
  75.  
  76. -- 
  77. Rule of programming #3: The number of bugs which exist in a program is
  78.     equal to the square of the number of bugs which you think exist.
  79.  
  80. Phil Norman, mailing from Exeter University.
  81. email:    forrey@eh.org
  82. URL:    http://newton.ex.ac.uk/general/ug/norman